package com.feng.seata.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class IdGeneratorAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public SnowflakeGenerator localIdGenerator() {
        return new SnowflakeGenerator(31, 1);
    }
}
